package cola0502.project.hellospringbootcola0502.service.impl;

import cola0502.project.hellospringbootcola0502.service.RedisService;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class RedisServiceImpl implements RedisService {

    @Resource
    RedisTemplate redisTemplate;

    @Override
    public void testRedisAdd(String key, String value) {
        redisTemplate.opsForValue().set(key,value);
    }

    @Override
    public void testRemove(String key) {
        redisTemplate.delete(key);
    }
}
